export const mixin = {
  data() {
    return {
      labelCol: {
        span: 3
      },
      wrapperCol: {
        span: 12
      }
    }
  },
  methods: {
    getFromValue() {
      this.$refs.ruleForm.validate(valid => {
        if (valid) {
          this.$emit('getFromValue', this.form)
        } else {
          console.log('error submit!!')
          return false
        }
      })
    },
    // 表单校验
    validateForm() {
      let that = this
      return new Promise((resolve, reject) => {
        that.$refs.ruleForm.validate(valid => {
          if (valid) {
            resolve(true)
          } else {
            resolve(false)
          }
        })
      })
    },
  }
}